package cn.xwt.weidisk.pojo.dto;

import cn.xwt.weidisk.pojo.dao.CategoryDo;

import java.util.Date;

/**
 * @author 薛慰涛
 * 分类信息类
 */
public class CategoryData {
    private Long id;
    private String name;
    private Long quantity;
    private Date createTime;

    public CategoryData() {
    }

    public CategoryData(CategoryDo category, Long quantity) {
        this.id = category.getId();
        this.name = category.getName();
        this.createTime = category.getCreateTime();
        this.quantity = quantity;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Long getQuantity() {
        return quantity;
    }

    public void setQuantity(Long quantity) {
        this.quantity = quantity;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Override
    public String toString() {
        return "CategoryData{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", quantity=" + quantity +
                ", createTime=" + createTime +
                '}';
    }
}
